/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   TrafficAdjust.java for com.pengtu.gsj.entity.jsbz    </p>
 * 
 * <p>最后修改 : $: 2017年8月1日-下午4:28:37 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jsbz;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 交调管理
 * TrafficAdjust
 * 
 * 2017年8月1日 下午4:28:37
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JS_TRAFFICADJUST")
public class TrafficAdjust extends IdEntity{

	private static final long serialVersionUID = -2117658739293620335L;
	private String stationName;							//站点名称
	private String year;								//年份
	private String stationPlan;							//站点规划
	private String stationConstruction;					//站点建设
	private String stationAnalyze;						//站点交通量分析
	private String yearReport;							//年度报告
	private String normalRun;							//是否正常运转
	private String dataComplete;						//数据是否完善
	private String remark;		
	
	//展示导出用 临时变量
	private Double attMark;								//文件得分
	private Double yearMark;							//年度报告和运行分析得分
	private Double runMark;								//正常运行得分;
	
	public TrafficAdjust(){
		
	}
	public TrafficAdjust(String stationName){
		this.stationName = stationName;
	}
	
	private Integer bulletinNumber;   //检测文件数
	private List<Attachment> attachments;
	
	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name = "STATIONNAME")
	public String getStationName() {
		return stationName;
	}
	public void setStationName(String stationName) {
		this.stationName = stationName;
	}
	@Column(name = "STATIONPLAN")
	public String getStationPlan() {
		return stationPlan;
	}
	public void setStationPlan(String stationPlan) {
		this.stationPlan = stationPlan;
	}
	@Column(name = "STATIONCONSTRUCTION")
	public String getStationConstruction() {
		return stationConstruction;
	}
	public void setStationConstruction(String stationConstruction) {
		this.stationConstruction = stationConstruction;
	}
	@Column(name = "STATIONANALYZE")
	public String getStationAnalyze() {
		return stationAnalyze;
	}
	public void setStationAnalyze(String stationAnalyze) {
		this.stationAnalyze = stationAnalyze;
	}
	@Column(name = "YEARREPORT")
	public String getYearReport() {
		return yearReport;
	}
	public void setYearReport(String yearReport) {
		this.yearReport = yearReport;
	}
	@Column(name = "NORMALRUN")
	public String getNormalRun() {
		return normalRun;
	}
	public void setNormalRun(String normalRun) {
		this.normalRun = normalRun;
	}
	@Column(name = "DATACOMPLETE")
	public String getDataComplete() {
		return dataComplete;
	}
	public void setDataComplete(String dataComplete) {
		this.dataComplete = dataComplete;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
	
	
	
	@Transient
	public Double getAttMark() {
		return attMark;
	}

	public void setAttMark(Double attMark) {
		this.attMark = attMark;
	}
	
	
	@Transient
	public Double getYearMark() {
		return yearMark;
	}

	public void setYearMark(Double yearMark) {
		this.yearMark = yearMark;
	}
	
	@Transient
	public Double getRunMark() {
		return runMark;
	}

	public void setRunMark(Double runMark) {
		this.runMark = runMark;
	}
}
